home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 17
/
Hot Mix 17.iso
/
HM17_SGI
/
research
/
lib
/
printd.pro
< prev
next >
Wrap
Text File
|
1997-07-08
|
979b
|
47 lines
; $Id: printd.pro,v 1.3 1997/01/15 03:11:50 ali Exp $
;
; Copyright (c) 1989-1997, Research Systems, Inc. All rights reserved.
; Unauthorized reproduction prohibited.
;+
; NAME:
; PRINTD
;
; PURPOSE:
; Display the contents of the directory stack maintained by the
; PUSHD and POPD User Library procedures.
;
; CALLING SEQUENCE:
; PRINTD
;
; OUTPUTS:
; PRINTD lists the contents of the directory stack on the default
; output device.
;
; COMMON BLOCKS:
; DIR_STACK: Contains the stack.
;
; MODIFICATION HISTORY:
; 17, July, 1989, Written by AB, RSI.
;-
;
;
pro printd
COMMON DIR_STACK, DEPTH, STACK
on_error,2 ;Return to caller if an error occurs
if (n_elements(DEPTH) eq 0) then depth = 0
CD, CURRENT=current
print, 'Current Directory: ', current
if (DEPTH eq 0) then begin
message, 'Directory stack is empty.'
endif else begin
print, 'Directory Stack Contents:'
for i = 0, DEPTH-1 do print,format='(I3,") ", A)', I, STACK[I]
endelse
end